home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC Component Debug ƒ / IC Component Source ƒ / __AppendRoutineDescriptor.r next >
Encoding:
Text File  |  1995-12-06  |  8.0 KB  |  114 lines  |  [TEXT/KAHL]

  1. ith or without the Mixed Mode Manager.
  2.     
  3.     Safe Fat Code Resource dependant on current mode ('Sdes' template) :
  4.     
  5.     Set FAT to 1, SAFE to 1, SAFER to 0, SHRINKING to 0, and CURRENTISA to 1 to build a "Safe
  6.     Fat" code resource, which is dependant on the current mode, with the 'Sdes' template.  Code
  7.     resources created with this template are similar to those created with the 'Fdes' template
  8.     (described above), but will run on a 68K Mac with or without the Mixed Mode Manager.
  9.  
  10.     Safer Fat Code Resource ('ades' template) :
  11.     
  12.     Set FAT to 1, SAFE to 1, SAFER to 1, SHRINKING to 0, and CURRENTISA to 0 to build a "Safer
  13.     Fat" code resource with the 'ades' template.  Code resources created with this template are
  14.     similar to those created with the 'sdes' template (described above).  The 'sdes' template was
  15.     inherited from MPW.  We provide a "Safer" code resource template to work around some
  16.     potential problems with the 'sdes' template.  Code resources created with this template support
  17.     register-based calling conventions, and 68K Macs without instruction caches.
  18.     
  19.     Safer Fat Code Resource dependant on current mode ('Ades' template) :
  20.     
  21.     Set FAT to 1, SAFE to 1, SAFER to 1, SHRINKING to 0, and CURRENTISA to 1 to build a "Safer
  22.     Fat" code resource, which is dependant on the current mode, with the 'Ades' template.  Code
  23.     resources created with this template are similar to those created with the 'Sdes' template
  24.     (described above), but works around some potential problems with it.  Code resources created
  25.     with this template supports register-based calling conventions, and 68K Macs without
  26.     instruction caches.
  27.     
  28.     Shrinking Safe Fat Code Resource ('<des' template) :
  29.     
  30.     Set FAT to 1, SAFE to 1, and SHRINKING to 1 to create a "Shrinking Safe Fat" code resource
  31.     with the '<des' template.  You would use this template if, when running on a PowerMac in
  32.     68K emulation, there is less overhead switching to PowerPC mode and executing your
  33.     PowerPC code than executing your 68K code.  This resource will determine what type of Mac
  34.     you are using.  If you are using a 68K Mac, the PowerPC code will be truncated from the end
  35.     of the resource in memory.  If you are using a PowerMac, the PowerPC code will be moved to
  36.     the start of the resource, and the left-over space will be truncated from the end of the
  37.     resource in memory.  This type of resource will run natively to either platform, and will not
  38.     keep unused code in memory.
  39.     
  40.     
  41. !!!    Beware, the 68K register A0 will not point to the start of your resource upon entry.  Some
  42. !!!    68K code resources rely on this.  For example, many INIT's pass A0 to RecoverHandle, to get a
  43. !!!    Handle to their code, to detach it (with DetachResource) from its resource file.  Instead, INIT's
  44. !!!    should use Get1Resource to get this Handle.
  45. !!!
  46. !!!    The SetUpA4-related routines will work properly in the 68K code of a "Fat" resource.
  47.     
  48.     • This file does not set any resource attributes for your code resource.  You must specify your
  49.     resource attributes below (ala Rez), or set them once your resource is built, with ResEdit.
  50.     
  51.     • To create your code resource, simply bring this project up to date.  You do not need to
  52.     generate a target.  Your code resource will be saved to your project's resource file.
  53.  
  54.     • This file must be compiled AFTER "_CopyToResource.r"
  55.     
  56.     Colen Garoutte-Carson
  57.     Symantec Corp.
  58. */
  59.  
  60. #if FAT
  61.     #if SAFE
  62.         #if SHRINKING
  63.             type ResType as '<des';
  64.         #else
  65.             #if SAFER
  66.                 #if CURRENTISA
  67.                     type ResType as 'Ades';
  68.                 #else
  69.                     type ResType as 'ades';
  70.                 #endif
  71.             #else
  72.                 #if CURRENTISA
  73.                     type ResType as 'Sdes';
  74.                 #else
  75.                     type ResType as 'sdes';
  76.                 #endif
  77.             #endif    
  78.         #endif
  79.     #else
  80.         #if CURRENTISA
  81.             type ResType as 'Fdes';
  82.         #else
  83.             type ResType as 'fdes';
  84.         #endif
  85.     #endif
  86. #else
  87.     type ResType as 'rdes';
  88. #endif
  89.  
  90. resource ResType (ResID,ResName) {
  91. #if FAT
  92.     #if SAFE
  93.         #if !SHRINKING
  94.             M68KProcInfo,
  95.             PPCProcInfo,
  96.         #endif
  97.     #else
  98.         M68KProcInfo,
  99.         PPCProcInfo,
  100.     #endif
  101. #else    
  102.     PPCProcInfo,
  103. #endif
  104. #if FAT
  105.     $$Resource(M68KResFile, M68KResType, M68KResID),
  106.     #if SAFE
  107.         #if SHRINKING
  108.             PPCProcInfo,
  109.         #endif
  110.     #endif
  111. #endif
  112.     $$Resource(PPCResFile, 'TEMP', 0)
  113. };
  114.